package mylibrary.outofmemory;

import java.util.*;

/**
 * VM Args：-Xms20m -Xmx20m -XX:+HeapDumpOnOutOfMemoryError
 * @author gaoshuai
 *
 */
public class HeapOOM {

	static class OOMObject{
		
	}
	
	public static void main(String[] args) {
		
		List list = new ArrayList();
		
		while(true){
			list.add(new OOMObject());	
		}
	}
}

